package test1.shapes;

public class Rectangle extends AbstractShape{
   public double sideA;
   public double sideB;
   public Rectangle(double b1,double b2){  //构造函数
        sideA=b1;
        sideB=b2; }
   public double getArea() {
        return sideA*sideB;
    }
    public double getPrim() {
        return 2*(sideA+sideB);
    }
}